package com.njh.check.service.impl;

import com.njh.check.service.FileService;
import com.njh.check.utils.OssUtils;
import com.njh.check.vo.CheckingResultImgVo;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author ：njh
 * @date ：Created in 2023/12/19 16:02
 * @description：
 * @modified By：
 * @version:
 */
@Service
public class FileServiceImpl implements FileService {

    public OssUtils ossUtils;

    @Override
    public CheckingResultImgVo upload(MultipartFile file) {
        CheckingResultImgVo checkingResultImgVo = ossUtils.ossUpload(file);
        return checkingResultImgVo;
    }


    @Override
    public void removeFile(String pictureUrl) {
        ossUtils.ossRemove(pictureUrl);
    }
}